﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Model;

namespace Bll
{
    public class FocusSlide
    {
        #region  // 获取幻灯片列表
        /// <summary>
        /// 获取幻灯片列表
        /// </summary>
        /// <returns>幻灯片列表</returns>
        public DataTable GetFocusList(string strCon)
        {
            return new Dal.FocusSlide().GetFocusList(strCon);
        }
        #endregion

        #region  // 根据PKID删除幻灯片——将Valid置为0
        /// <summary>
        /// 根据PKID删除幻灯片——将Valid置为0
        /// </summary>
        /// <param name="pkid">PKID</param>
        /// <returns>1</returns>
        public int DeleteFocusByPKID(int pkid, string strCon)
        {
            return new Dal.FocusSlide().DeleteFocusByPKID(pkid, strCon);
        }
        #endregion

        #region  // 修改幻灯片内容
        /// <summary>
        /// 修改幻灯片内容
        /// </summary>
        /// <param name="fs">TFocusSlide对象</param>
        /// <returns>1</returns>
        public int UpdateFocusByPKID(Model.FocusSlide fs, string strCon)
        {
            return new Dal.FocusSlide().UpdateFocusByPKID(fs, strCon);
        }
        #endregion

        #region //根据PKID提取幻灯片数据
        /// <summary>
        /// 根据PKID提取幻灯片数据
        /// </summary>
        /// <param name="pkid">PKID</param>
        /// <returns>TFocusSlid by pkid</returns>
        public DataTable GetFocusByPKID(int pkid, string strCon)
        {
            return new Dal.FocusSlide().GetFocusByPKID(pkid, strCon);
        }
        #endregion

        /// <summary>
        /// 新增幻灯片
        /// </summary>
        /// <param name="fs">FocusSlide实体对象</param>
        /// <returns>1</returns>
        public int AddFocus(Model.FocusSlide fs, string strCon)
        {
            return new Dal.FocusSlide().AddFocus(fs, strCon);
        }
    }
}
